package com.zhong.service;

import com.zhong.dao.EmpDao;
import com.zhong.po.Emp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service      //标识该类为业务层
//@Controller   //标识该类为控制层
//@Repository   //标识该类为dao
//@Component    //不能确定时，泛指
public class EmpServiceImpl implements EmpService {

    @Autowired  //自动注入 DI
    private EmpDao empDao;

    public Emp view(int id) {
        System.err.println(empDao);
        return empDao.selectByPrimaryKey(id);
    }
}
